package com.lyc.day1101.demo6;

/**
 * @author ：Xiaochen
 * @date ：Created in 2022/11/1 20:37
 * @description：
 * @modified By：
 * @version:
 */
public class Girl extends Thread{
    @Override
    public void run() {
        synchronized (LockObject.lock2){
            System.out.println(Thread.currentThread().getName()+"获取一个画板");
            synchronized (LockObject.lock1){
                System.out.println(Thread.currentThread().getName()+"获取了一只画笔");
                System.out.println(Thread.currentThread().getName()+"可以画画了");
            }
        }

    }
}